import { http } from "@/utils/http";
import { cmsUrl } from "@/utils/http/utils";
import type { PageInfo, ResultSet } from "@/common/type/CommonType";
import type { NewCMSContent, VideoContent } from "@/common/type/cms/content";

export const selectList = (data?: NewCMSContent) => {
  return http.request<ResultSet<PageInfo<NewCMSContent>>>(
    "post",
    cmsUrl("content/rich/list"),
    { data }
  );
};

export const selectVideoList = (contentId?: string) => {
  return http.request<ResultSet<VideoContent[]>>(
    "get",
    cmsUrl(`content/video/list/${contentId}`)
  );
};
